// src/router/index.tsx
import Index from "../views/index";
import Enroll from "../views/enroll";
import Login from "../views/login";
import Classify from "../views/classify";
import Clock from "../views/clock";
import Shopcart from "../views/shopcart";
import Me from "../views/me";
import Detail from "../views/detail";
import Search from "../views/search";
import Buynow from "../views/buynow";
import Successful from "../views/successful";
import Address from "../views/address";
import Newadd from "../views/newadd";
import Editaddress from "../views/editaddress";
import Footprint from "../views/footprint";
import Collect from "../views/collect";
import Coupon from "../views/coupon";
import Orders from "../views/orders"
import Quit from "../views/quit";
import BuynowS from "../views/buynowS";
import Student from "../views/student";
import Score from "../views/score";
import ScoreDetails from "../views/scoreDetails";
import Ranking from "../views/ranking";
import Orderdetails from "../views/Orderdetails";
import Pointsdetails from "../views/Pointsdetails";
import ProductDetailPage from "../views/ProductDetailPage";
import Pointspurchase from "../views/pointspurchase";
import Pointssuccessful from '../views/pointssuccessful'
import { Navigate } from "react-router-dom";
import { title } from "process";

const routes = [
  { path: "/", element: <Login /> },
  { path: "/home", element: <Index />, title: "首页" },
  { path: "/login", element: <Login />, title: "登录" },
  { path: "/enroll", element: <Enroll />, title: "注册" },
  { path: "/classify", element: <Classify />, title: "分类" },
  { path: "/clock", element: <Clock />, title: "打卡" },
  { path: "/search", element: <Search />, title: "我的" },
  { path: "/shopcart", element: <Shopcart />, title: "购物车" },
  { path: "/detail", element: <Detail />, title: "商品详情" },
  { path: "/buynow", element: <Buynow />, title: "立即购买" },
  { path: "/buynowS", element: <BuynowS />, title: "立即购买2" },
  { path: "/address", element: <Address />, title: "地址管理" },
  { path: "/successful", element: <Successful />, title: "购买成功" },
  { path: "/newadd", element: <Newadd />, title: "新增地址" },
  { path: "/editaddress", element: <Editaddress />, title: "编辑地址" },
  { path: "/footprint", element: <Footprint />, title: "我的足迹" },
  { path: "/collect", element: <Collect />, title: "我的收藏" },
  { path: "/coupon", element: <Coupon />, title: "优惠券" },
  { path: "/orders", element: <Orders />, title: "我的订单" },
  { path: "/student", element: <Student />, title: "学员管理" },
  { path: "/score", element: <Score />, title: "积分管理" },
  { path: "/scoreDetails", element: <ScoreDetails />, title: "积分明细" },
  { path: "/ranking", element: <Ranking />, title: "排行榜" },
  { path: "/Orderdetails", element: <Orderdetails />, title: "订单详情" },
  { path: "/Pointsdetails", element: <Pointsdetails />, title: "积分订单详情" },
  {path:"/productDetailPage" , element:<ProductDetailPage/>,title:"积分商品详情"},
  { path: "/pointspurchase", element: <Pointspurchase />, title: "积分购买" },
  { path: "/pointssuccessful", element: <Pointssuccessful />, title: "积分购买成功" },
  { path: "/quit", element: <Quit />, title: "退出登录" },
  { path: "/me", element: <Me />, title: "我的" },
  { path: "*", element: <Navigate to="/" /> },
];

export default routes;
